package com.example.a28796.beautiful.stybean;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import org.json.JSONException;
import org.json.JSONObject;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by lenovo on 2016/8/30.
 */
public class QuanziBean {

    /**
     * code : 0
     * message : null
     * obj : {"listData":[{"bid":499028,"name":"皮肤美容圈","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FmlqNaAolDFz_oKZwME4f1_AV2jC.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":3,"boardNum":{"todayUpdateNum":25,"groupNum":36680}},{"bid":507523,"name":"微整形圈","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FiQcEvq4vTQDYW7OucoWpW0bMmbH.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":3,"boardNum":{"todayUpdateNum":49,"groupNum":139805}},{"bid":3142001,"name":"减肥塑形圈","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/Fk8-lMttg804fXlsOQfSGWxq4VEr.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":3,"boardNum":{"todayUpdateNum":48,"groupNum":19313}},{"bid":3142002,"name":"美妆圈","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FvC14EuhQOU-Y4CJM7b_QNYwx0Kc.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":3,"boardNum":{"todayUpdateNum":10,"groupNum":18781}},{"bid":3142003,"name":"黛粉生活圈","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FsERufrj_wG6lWf2NDc0T_iPKXnn.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":3,"boardNum":{"todayUpdateNum":5,"groupNum":12063}},{"bid":506371,"name":"抗衰老圈","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FgkN4d5M46W-dv-kJJuqBStMNlE7.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":3,"boardNum":{"todayUpdateNum":0,"groupNum":4547}},{"bid":687361,"name":"郑州同城","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FiUwBH-Y9EZ8-VfQh0c6uBe8r6Az.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":5,"boardNum":{"todayUpdateNum":0,"groupNum":7603}},{"bid":687360,"name":"长沙同城","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/Fm-udhlYLKZSnZeO8uKwfW5zMzAW.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":5,"boardNum":{"todayUpdateNum":0,"groupNum":8472}},{"bid":687359,"name":"武汉同城","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FvVDRRstnK3Hpa4afrBpi45gHaXB.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":5,"boardNum":{"todayUpdateNum":0,"groupNum":10271}},{"bid":688313,"name":"上海同城","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/Fjz9W6TkYjYx5jG36nUEF1xDHhXk.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":5,"boardNum":{"todayUpdateNum":0,"groupNum":8776}},{"bid":687357,"name":"广州同城","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/Fq-2zstnoGKgMCwnp41-0YsSQcdz.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":5,"boardNum":{"todayUpdateNum":8,"groupNum":18611}},{"bid":687355,"name":"成都同城","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/Fj99W9uwBDAJemR42ddS-Zm256xr.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":5,"boardNum":{"todayUpdateNum":0,"groupNum":16419}},{"bid":687354,"name":"北京同城","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FvLCdLiwRzZv0Ckhw4ua6Zs-_t9-.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":5,"boardNum":{"todayUpdateNum":9,"groupNum":12631}}],"hasNext":0}
     * now : 1472524484
     * sign : null
     */

    private int code;
    private Object message;
    /**
     * listData : [{"bid":499028,"name":"皮肤美容圈","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FmlqNaAolDFz_oKZwME4f1_AV2jC.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":3,"boardNum":{"todayUpdateNum":25,"groupNum":36680}},{"bid":507523,"name":"微整形圈","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FiQcEvq4vTQDYW7OucoWpW0bMmbH.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":3,"boardNum":{"todayUpdateNum":49,"groupNum":139805}},{"bid":3142001,"name":"减肥塑形圈","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/Fk8-lMttg804fXlsOQfSGWxq4VEr.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":3,"boardNum":{"todayUpdateNum":48,"groupNum":19313}},{"bid":3142002,"name":"美妆圈","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FvC14EuhQOU-Y4CJM7b_QNYwx0Kc.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":3,"boardNum":{"todayUpdateNum":10,"groupNum":18781}},{"bid":3142003,"name":"黛粉生活圈","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FsERufrj_wG6lWf2NDc0T_iPKXnn.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":3,"boardNum":{"todayUpdateNum":5,"groupNum":12063}},{"bid":506371,"name":"抗衰老圈","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FgkN4d5M46W-dv-kJJuqBStMNlE7.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":3,"boardNum":{"todayUpdateNum":0,"groupNum":4547}},{"bid":687361,"name":"郑州同城","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FiUwBH-Y9EZ8-VfQh0c6uBe8r6Az.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":5,"boardNum":{"todayUpdateNum":0,"groupNum":7603}},{"bid":687360,"name":"长沙同城","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/Fm-udhlYLKZSnZeO8uKwfW5zMzAW.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":5,"boardNum":{"todayUpdateNum":0,"groupNum":8472}},{"bid":687359,"name":"武汉同城","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FvVDRRstnK3Hpa4afrBpi45gHaXB.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":5,"boardNum":{"todayUpdateNum":0,"groupNum":10271}},{"bid":688313,"name":"上海同城","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/Fjz9W6TkYjYx5jG36nUEF1xDHhXk.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":5,"boardNum":{"todayUpdateNum":0,"groupNum":8776}},{"bid":687357,"name":"广州同城","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/Fq-2zstnoGKgMCwnp41-0YsSQcdz.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":5,"boardNum":{"todayUpdateNum":8,"groupNum":18611}},{"bid":687355,"name":"成都同城","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/Fj99W9uwBDAJemR42ddS-Zm256xr.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":5,"boardNum":{"todayUpdateNum":0,"groupNum":16419}},{"bid":687354,"name":"北京同城","desc":"","photo":{"url":"http://s.img.meidaila.net/160602/FvLCdLiwRzZv0Ckhw4ua6Zs-_t9-.png","w":210,"h":158,"status":0,"desc":null,"extra":null},"type":5,"boardNum":{"todayUpdateNum":9,"groupNum":12631}}]
     * hasNext : 0
     */

    private ObjBean obj;
    private int now;
    private Object sign;

    public static QuanziBean objectFromData(String str) {

        return new Gson().fromJson(str, QuanziBean.class);
    }

    public static QuanziBean objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), QuanziBean.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public static List<QuanziBean> arrayQuanziBeanFromData(String str) {

        Type listType = new TypeToken<ArrayList<QuanziBean>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public static List<QuanziBean> arrayQuanziBeanFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);
            Type listType = new TypeToken<ArrayList<QuanziBean>>() {
            }.getType();

            return new Gson().fromJson(jsonObject.getString(str), listType);

        } catch (JSONException e) {
            e.printStackTrace();
        }

        return new ArrayList();


    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public Object getMessage() {
        return message;
    }

    public void setMessage(Object message) {
        this.message = message;
    }

    public ObjBean getObj() {
        return obj;
    }

    public void setObj(ObjBean obj) {
        this.obj = obj;
    }

    public int getNow() {
        return now;
    }

    public void setNow(int now) {
        this.now = now;
    }

    public Object getSign() {
        return sign;
    }

    public void setSign(Object sign) {
        this.sign = sign;
    }

    public static class ObjBean {
        private int hasNext;
        /**
         * bid : 499028
         * name : 皮肤美容圈
         * desc :
         * photo : {"url":"http://s.img.meidaila.net/160602/FmlqNaAolDFz_oKZwME4f1_AV2jC.png","w":210,"h":158,"status":0,"desc":null,"extra":null}
         * type : 3
         * boardNum : {"todayUpdateNum":25,"groupNum":36680}
         */

        private List<ListDataBean> listData;

        public static ObjBean objectFromData(String str) {

            return new Gson().fromJson(str, ObjBean.class);
        }

        public static ObjBean objectFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);

                return new Gson().fromJson(jsonObject.getString(str), ObjBean.class);
            } catch (JSONException e) {
                e.printStackTrace();
            }

            return null;
        }

        public static List<ObjBean> arrayObjBeanFromData(String str) {

            Type listType = new TypeToken<ArrayList<ObjBean>>() {
            }.getType();

            return new Gson().fromJson(str, listType);
        }

        public static List<ObjBean> arrayObjBeanFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);
                Type listType = new TypeToken<ArrayList<ObjBean>>() {
                }.getType();

                return new Gson().fromJson(jsonObject.getString(str), listType);

            } catch (JSONException e) {
                e.printStackTrace();
            }

            return new ArrayList();


        }

        public int getHasNext() {
            return hasNext;
        }

        public void setHasNext(int hasNext) {
            this.hasNext = hasNext;
        }

        public List<ListDataBean> getListData() {
            return listData;
        }

        public void setListData(List<ListDataBean> listData) {
            this.listData = listData;
        }

        public static class ListDataBean {
            private int bid;
            private String name;
            private String desc;
            /**
             * url : http://s.img.meidaila.net/160602/FmlqNaAolDFz_oKZwME4f1_AV2jC.png
             * w : 210
             * h : 158
             * status : 0
             * desc : null
             * extra : null
             */

            private PhotoBean photo;
            private int type;
            /**
             * todayUpdateNum : 25
             * groupNum : 36680
             */

            private BoardNumBean boardNum;

            public static ListDataBean objectFromData(String str) {

                return new Gson().fromJson(str, ListDataBean.class);
            }

            public static ListDataBean objectFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);

                    return new Gson().fromJson(jsonObject.getString(str), ListDataBean.class);
                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return null;
            }

            public static List<ListDataBean> arrayListDataBeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<ListDataBean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public static List<ListDataBean> arrayListDataBeanFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);
                    Type listType = new TypeToken<ArrayList<ListDataBean>>() {
                    }.getType();

                    return new Gson().fromJson(jsonObject.getString(str), listType);

                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return new ArrayList();


            }

            public int getBid() {
                return bid;
            }

            public void setBid(int bid) {
                this.bid = bid;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getDesc() {
                return desc;
            }

            public void setDesc(String desc) {
                this.desc = desc;
            }

            public PhotoBean getPhoto() {
                return photo;
            }

            public void setPhoto(PhotoBean photo) {
                this.photo = photo;
            }

            public int getType() {
                return type;
            }

            public void setType(int type) {
                this.type = type;
            }

            public BoardNumBean getBoardNum() {
                return boardNum;
            }

            public void setBoardNum(BoardNumBean boardNum) {
                this.boardNum = boardNum;
            }

            public static class PhotoBean {
                private String url;
                private int w;
                private int h;
                private int status;
                private Object desc;
                private Object extra;

                public static PhotoBean objectFromData(String str) {

                    return new Gson().fromJson(str, PhotoBean.class);
                }

                public static PhotoBean objectFromData(String str, String key) {

                    try {
                        JSONObject jsonObject = new JSONObject(str);

                        return new Gson().fromJson(jsonObject.getString(str), PhotoBean.class);
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    return null;
                }

                public static List<PhotoBean> arrayPhotoBeanFromData(String str) {

                    Type listType = new TypeToken<ArrayList<PhotoBean>>() {
                    }.getType();

                    return new Gson().fromJson(str, listType);
                }

                public static List<PhotoBean> arrayPhotoBeanFromData(String str, String key) {

                    try {
                        JSONObject jsonObject = new JSONObject(str);
                        Type listType = new TypeToken<ArrayList<PhotoBean>>() {
                        }.getType();

                        return new Gson().fromJson(jsonObject.getString(str), listType);

                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    return new ArrayList();


                }

                public String getUrl() {
                    return url;
                }

                public void setUrl(String url) {
                    this.url = url;
                }

                public int getW() {
                    return w;
                }

                public void setW(int w) {
                    this.w = w;
                }

                public int getH() {
                    return h;
                }

                public void setH(int h) {
                    this.h = h;
                }

                public int getStatus() {
                    return status;
                }

                public void setStatus(int status) {
                    this.status = status;
                }

                public Object getDesc() {
                    return desc;
                }

                public void setDesc(Object desc) {
                    this.desc = desc;
                }

                public Object getExtra() {
                    return extra;
                }

                public void setExtra(Object extra) {
                    this.extra = extra;
                }
            }

            public static class BoardNumBean {
                private int todayUpdateNum;
                private int groupNum;

                public static BoardNumBean objectFromData(String str) {

                    return new Gson().fromJson(str, BoardNumBean.class);
                }

                public static BoardNumBean objectFromData(String str, String key) {

                    try {
                        JSONObject jsonObject = new JSONObject(str);

                        return new Gson().fromJson(jsonObject.getString(str), BoardNumBean.class);
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    return null;
                }

                public static List<BoardNumBean> arrayBoardNumBeanFromData(String str) {

                    Type listType = new TypeToken<ArrayList<BoardNumBean>>() {
                    }.getType();

                    return new Gson().fromJson(str, listType);
                }

                public static List<BoardNumBean> arrayBoardNumBeanFromData(String str, String key) {

                    try {
                        JSONObject jsonObject = new JSONObject(str);
                        Type listType = new TypeToken<ArrayList<BoardNumBean>>() {
                        }.getType();

                        return new Gson().fromJson(jsonObject.getString(str), listType);

                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    return new ArrayList();


                }

                public int getTodayUpdateNum() {
                    return todayUpdateNum;
                }

                public void setTodayUpdateNum(int todayUpdateNum) {
                    this.todayUpdateNum = todayUpdateNum;
                }

                public int getGroupNum() {
                    return groupNum;
                }

                public void setGroupNum(int groupNum) {
                    this.groupNum = groupNum;
                }
            }
        }
    }
}
